package com.project.common.controller;

import com.project.common.entity.TMenus;
import com.project.common.service.TMenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
@CrossOrigin
public class MenuController {
    @Autowired
    private TMenusService tMenusService;
    @PostMapping("/queryAllMenus")
    public List<TMenus> queryAllMenus(){
        return tMenusService.queryAllMenus();
    }
}
